|
|
 |
|
|
|
|
Private Declare Function PolyPolygon Lib "gdi32" _
Alias "PolyPolygon" (ByVal hdc As Long, _
lpPoint As POINTAPI, lpPolyCounts As Long, _
ByVal nCount As Long) As Long |
|
|
|
|
|
|
|
|
The Polyline function draws a sequence of line segments connecting the points in the lpPoints array. The nCount parameter gives the number of points in lpPoints. Be certain this number is correct. If this number is too large, the Polyline API function will try to read beyond the end of the lpPoints array, and it may crash your program. |
|
|
|
|
|
|
|
|
The Polygon function is similar to Polyline except it connects the first and last points to form a closed polygon. The function fills the polygon using the current FillStyle and FillColor. |
|
|
|
|
|
|
|
|
The PolyPolyline function draws a group of polylines. Its second parameter, lppt, is an array of POINTAPI data structures that define all the points for all of the polylines. The first polyline's points comes first, the second polyline's points come next, and so forth. The function's third parameter, lpdwPolyPoints, is an array of long integers giving the number of points in each polyline. The value lpdwPolyPoints(l) is the number of points in the first polyline, lpdwPolyPoints(2) is the number of points in the second polyline, and so forth. The PolyPolyline function's final parameter, cCount, is the number of polylines. This tells the function how many entries are in the lpdwPolyPoints array. The number of entries in that array tells the function which entries to combine in the lppt array to produce the polylines. |
|
|
|
|
|
|
|
|
The PolyPolygon function is similar to PolyPolyline except it connects the first and last point in each polyline to form a closed polygon. The function fills the polygons using the current FillStyle and FillColor. |
|
|
|
|
|
|
|
|
Example program Polyline is shown in Figure 2.5. |
|
|
|
|
|
|
|
|
Figure 2.5
Program Polyline demonstrates the Polyline, Polygon,
PolyPolyline, and PolyPolygon API functions. |
|
|
|
|
|